<template>
	<view class="result">
		<div class="title">{{data.title}}</div>
		<uv-parse :content="data.content"></uv-parse>
	</view>
</template>

<script>
	import {getNewInfo ,newClick} from '@/network/api.js'
	export default {
		data() {
			return {
				data:{
					title:'',
					content:''
				}
			}
		},
		onShow(){
			// #ifdef H5
			document.title = ' '
			// #endif
		},
		onLoad(options){
			// #ifdef H5
			document.title = ' '
			// #endif
			const id = options.id	
			this.getInfo(id)
			newClick({id})
		},
		methods: {
			async getInfo(id){
				const { data } = await getNewInfo({id})
				console.log('data:',data)
				this.data = data || {title:"",content:'没有信息'}
			}
		}
	}
</script>

<style scoped>
.result{
	padding: 25rpx;
}
.title{
	font-size: 50rpx;
	font-weight: bold;
	/* text-align: center; */
	margin-bottom: 20rpx;
}
</style>
